<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>外观设置 - 朋知云学</title>
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="../css/admin.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@4.1.1/animate.min.css">
    <style>
        .settings-container {
            padding: 20px;
            max-width: 800px;
            margin: 0 auto;
        }

        .settings-content {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            padding: 30px;
            transition: all 0.3s ease;
        }

        .settings-header {
            margin-bottom: 30px;
            border-bottom: 2px solid #f0f0f0;
            padding-bottom: 20px;
        }

        .settings-header h2 {
            color: #333;
            font-size: 24px;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .settings-header p {
            color: #666;
            font-size: 16px;
        }

        .theme-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .theme-card {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        }

        .theme-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
        }

        .theme-card.active {
            border-color: #4a90e2;
            background: #e8f0fe;
        }

        .theme-preview {
            height: 120px;
            background: #ddd;
            border-radius: 8px;
            margin-bottom: 15px;
            transition: all 0.3s ease;
            box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
        }

        .theme-name {
            font-weight: 500;
            color: #333;
            margin-bottom: 5px;
            font-size: 16px;
        }

        .theme-description {
            font-size: 14px;
            color: #666;
        }

        .color-settings {
            margin-bottom: 30px;
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            border: 1px solid #eee;
            transition: all 0.3s ease;
        }

        .color-settings:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .color-row {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        .color-label {
            width: 120px;
            font-weight: 500;
            color: #444;
        }

        .color-picker {
            width: 50px;
            height: 30px;
            padding: 0;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
        }

        .color-picker:hover {
            transform: scale(1.05);
        }

        .layout-options {
            margin-bottom: 30px;
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            border: 1px solid #eee;
            transition: all 0.3s ease;
        }

        .layout-options:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .layout-option {
            display: flex;
            align-items: center;
            padding: 15px;
            background: white;
            border-radius: 8px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 1px solid #eee;
        }

        .layout-option:hover {
            background: #e9ecef;
            transform: translateY(-2px);
        }

        .layout-option input[type="radio"] {
            margin-right: 10px;
        }

        .settings-actions {
            display: flex;
            justify-content: flex-end;
            gap: 15px;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }

        .btn {
            padding: 12px 24px;
            border-radius: 6px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-primary {
            background-color: #4a90e2;
            color: white;
            border: none;
        }

        .btn-primary:hover {
            background-color: #357abd;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(74, 144, 226, 0.2);
        }

        .btn-secondary {
            background-color: #f8f9fa;
            color: #666;
            border: 1px solid #ddd;
        }

        .btn-secondary:hover {
            background-color: #e9ecef;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        }
        
        /* 外观设置特有样式 */
        .appearance-settings {
            animation: fadeIn 0.5s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .section-title {
            font-size: 18px;
            font-weight: 500;
            color: #333;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        
        .section-title i {
            margin-right: 8px;
            color: #4a90e2;
        }
    </style>
</head>
<body class="admin-body">
    <div class="admin-container">
        <!-- 侧边栏 -->
        <div class="admin-sidebar">
            <div class="admin-user">
                <div class="admin-user-info">
                    <div class="admin-username">管理员</div>
                    <div class="admin-role">超级管理员</div>
                </div>
            </div>
            
            <ul class="admin-sidebar-menu">
                <li class="admin-sidebar-item">
                    <a href="dashboard.html" class="admin-sidebar-link">
                        <i class="bi bi-speedometer2"></i>
                        <span>控制台</span>
                    </a>
                </li>
                <li class="admin-sidebar-item">
                    <a href="users.html" class="admin-sidebar-link">
                        <i class="bi bi-people"></i>
                        <span>用户管理</span>
                    </a>
                </li>
                <li class="admin-sidebar-item">
                    <a href="demands.html" class="admin-sidebar-link">
                        <i class="bi bi-list-check"></i>
                        <span>需求管理</span>
                    </a>
                </li>
                <li class="admin-sidebar-item">
                    <a href="applications.html" class="admin-sidebar-link">
                        <i class="bi bi-file-earmark-text"></i>
                        <span>申请审核</span>
                    </a>
                </li>
                <li class="admin-sidebar-item active">
                    <a href="settings.html" class="admin-sidebar-link">
                        <i class="bi bi-gear"></i>
                        <span>系统设置</span>
                    </a>
                </li>
                <li class="admin-sidebar-item">
                    <a href="../index.html" class="admin-sidebar-link">
                        <i class="bi bi-box-arrow-left"></i>
                        <span>返回前台</span>
                    </a>
                </li>
            </ul>
        </div>
        
        <!-- 主内容区 -->
        <div class="admin-content animate__animated animate__fadeIn">
            <div class="admin-header">
                <h1>外观设置</h1>
                <div class="admin-header-actions">
                    <div class="admin-notifications">
                        <i class="bi bi-bell"></i>
                        <span class="badge">3</span>
                    </div>
                </div>
            </div>
            
            <!-- 设置内容 -->
            <div class="settings-container">
                <div class="settings-content">
                    <div class="settings-header">
                        <h2>外观设置</h2>
                        <p>自定义系统界面外观和主题</p>
                    </div>
                    
                    <div class="appearance-settings">
                        <h3 class="section-title"><i class="bi bi-palette"></i>主题选择</h3>
                        <div class="theme-grid">
                            <div class="theme-card active">
                                <div class="theme-preview" style="background: #4a90e2;"></div>
                                <div class="theme-name">默认主题</div>
                                <div class="theme-description">经典蓝色主题</div>
                            </div>
                            <div class="theme-card">
                                <div class="theme-preview" style="background: #2ecc71;"></div>
                                <div class="theme-name">自然绿</div>
                                <div class="theme-description">清新自然风格</div>
                            </div>
                            <div class="theme-card">
                                <div class="theme-preview" style="background: #9b59b6;"></div>
                                <div class="theme-name">优雅紫</div>
                                <div class="theme-description">高贵优雅风格</div>
                            </div>
                            <div class="theme-card">
                                <div class="theme-preview" style="background: #e74c3c;"></div>
                                <div class="theme-name">活力红</div>
                                <div class="theme-description">充满活力的设计</div>
                            </div>
                        </div>
                        
                        <h3 class="section-title"><i class="bi bi-droplet-half"></i>颜色设置</h3>
                        <div class="color-settings">
                            <div class="color-row">
                                <span class="color-label">主色调</span>
                                <input type="color" class="color-picker" value="#4a90e2">
                                <span class="color-value" style="margin-left: 10px;">#4a90e2</span>
                            </div>
                            <div class="color-row">
                                <span class="color-label">次要色调</span>
                                <input type="color" class="color-picker" value="#6c757d">
                                <span class="color-value" style="margin-left: 10px;">#6c757d</span>
                            </div>
                            <div class="color-row">
                                <span class="color-label">强调色</span>
                                <input type="color" class="color-picker" value="#28a745">
                                <span class="color-value" style="margin-left: 10px;">#28a745</span>
                            </div>
                            <div class="color-row">
                                <span class="color-label">背景色</span>
                                <input type="color" class="color-picker" value="#f8f9fa">
                                <span class="color-value" style="margin-left: 10px;">#f8f9fa</span>
                            </div>
                        </div>
                        
                        <h3 class="section-title"><i class="bi bi-grid-3x3-gap"></i>布局选项</h3>
                        <div class="layout-options">
                            <div class="layout-option">
                                <input type="radio" id="layout-standard" name="layout" checked>
                                <label for="layout-standard">标准布局</label>
                            </div>
                            <div class="layout-option">
                                <input type="radio" id="layout-compact" name="layout">
                                <label for="layout-compact">紧凑布局</label>
                            </div>
                            <div class="layout-option">
                                <input type="radio" id="layout-wide" name="layout">
                                <label for="layout-wide">宽屏布局</label>
                            </div>
                        </div>
                        
                        <div class="settings-actions">
                            <button type="button" class="btn btn-secondary">重置</button>
                            <button type="submit" class="btn btn-primary">保存设置</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <script src="../js/utils.js"></script>
    <script src="../js/settings.js"></script>
    <script>
        // 主题卡片选择功能
        document.querySelectorAll('.theme-card').forEach(card => {
            card.addEventListener('click', function() {
                // 移除所有卡片的active类
                document.querySelectorAll('.theme-card').forEach(c => {
                    c.classList.remove('active');
                });
                
                // 给当前卡片添加active类
                this.classList.add('active');
            });
        });
        
        // 颜色选择器更新显示值
        document.querySelectorAll('.color-picker').forEach(picker => {
            picker.addEventListener('input', function() {
                const valueDisplay = this.nextElementSibling;
                valueDisplay.textContent = this.value;
            });
        });
    </script>
</body>
</html>